﻿using lingopen.Application;
using lingopen.AutoMapper;
using lingopen.Entity;
using lingopen.Entity.CNC;
using lingopen.Entity.System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lingopen.Application.Jabil
{
    public class CNC_TransferInput : ValidationModel
    {
        public string Request_ID { get; set; }

        [RequiredAttribute(ErrorMessage = "产品码不能为空")]
        public string Prod_Code { get; set; }
        [RequiredAttribute(ErrorMessage = "治具码不能为空")]
        public string Tool_Code { get; set; }
        public string Machine_Code { get; set; }
        public string Prod_Line { get; set; }
        public DateTime? Start_Time { get; set; }
        public DateTime? End_Time { get; set; }
        [RequiredAttribute(ErrorMessage = "工作站类型不能为空")]
        public string Station_Type { get; set; }
    }

    [MapToType(typeof(CNC_Transfer))]
    public class Add_CNC_Transfer : CNC_TransferInput
    {
        public string CreateUserId { get; set; }
    }

    [MapToType(typeof(CNC_Transfer))]
    public class Update_CNC_Transfer : CNC_TransferInput
    {
        [RequiredAttribute(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }
    }



    public class CNC_CheckInput : ValidationModel
    {
        public string Request_ID { get; set; }

        [RequiredAttribute(ErrorMessage = "产品码不能为空")]
        public string Prod_Code { get; set; }
        [RequiredAttribute(ErrorMessage = "治具码不能为空")]
        public string Tool_Code { get; set; }
        public string Machine_Code { get; set; }
        public string Prod_Line { get; set; }
        public DateTime? Start_Time { get; set; }
        public DateTime? End_Time { get; set; }
        [RequiredAttribute(ErrorMessage = "工作站类型不能为空")]
        public string Station_Type { get; set; }
    }

    [MapToType(typeof(CNC_Check))]
    public class Add_CNC_Check : CNC_CheckInput
    {
        public string CreateUserId { get; set; }
    }

    [MapToType(typeof(CNC_Check))]
    public class Update_CNC_Check : CNC_CheckInput
    {
        [RequiredAttribute(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }
    }
}
